<?php

/**
 * 日志页面获取规则配置
 * @author Thinkpad-ZXM
 *
 */
class LogPageConfig {

	/**
	 * 接参配置
	 * key：页面标识
	 * table：表名
	 * selectCase：查询条件配置
	 * key：post KEY
	 * type：查询类型
	 * searchCase：生成html的方法
	 * searchName：搜索字段名称
	 * 其余参数参照类型sql生成方法
	 *
	 * @var array
	 */
	public static $pageConfig = array(
		// 管理员登陆日志
		'adminLogin' => array(
			'table' => 'adminlogin',
			'pageName' => '管理员登陆日志',
			'selectCase' => array(
				'loginIp' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '登陆IP'
				),
				'loginTime' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"dateStart",
						"dateEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"dateStart" => '起始时间',
						"dateEnd" => '结束时间'
					)
				),
				'userId' => array(
					'type' => 'stringMatch',
					'searchCase' => 'Int',
					'searchName' => '用户ID'
				),
				'userName' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '用户名'
				),
				'loginStatus' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '成功',
						'0' => '失败'
					),
					'searchCase' => 'Select',
					'searchName' => '登录状态'
				),
				'isExport' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '是',
						'0' => '否'
					),
					'searchCase' => 'Select',
					'searchName' => '是否已导出'
				)
			),
			'listConfg' => array(
				'日志编号' => 'newLogId',
				'登录时间' => 'loginTime',
				'登陆IP' => 'loginIp',
				'用户名' => 'userName',
				'登录状态' => 'loginStatus',
				'是否已导出' => 'isExport'
			),
			'redTr' => array(
				'field' => 'loginStatus',
				'value' => '0'
			),
			'filter' => array(
				array(
					'field' => 'isAudit',
					'value' => '0',
					'type' => ' = '
				)
			),
		),
		// 账号维护日志
		'adminModify' => array(
			'table' => 'adminmodify',
			'pageName' => '账号维护日志',
			'selectCase' => array(
				'ip' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '操作IP'
				),
				'date' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"dateStart",
						"dateEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"dateStart" => '起始时间',
						"dateEnd" => '结束时间'
					)
				),
				'userId' => array(
					'type' => 'stringMatch',
					'searchCase' => 'Int',
					'searchName' => '用户ID'
				),
				'userName' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '用户名'
				),
				'isExport' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '是',
						'0' => '否'
					),
					'searchCase' => 'Select',
					'searchName' => '是否已导出'
				)
			),
			'listConfg' => array(
				'日志编号' => 'newLogId',
				'日期' => 'date',
				'IP地址' => 'ip',
				'用户名' => 'userName',
				'是否已导出' => 'isExport',
				'描述' => 'description'
			),
			'filter' => array(
				array(
					'field' => 'isAudit',
					'value' => '1',
					'type' => ' = '
				)
			),
		),
		// 审计操作日志
		'audit' => array(
			'table' => 'audit',
			'pageName' => '管理员操作日志',
			'selectCase' => array(
//				'operator' => array(
//					'type' => 'stringMatch',
//					'searchCase' => 'Int',
//					'searchName' => '审计员ID'
//				),
//				'operatorName' => array(
//					'type' => 'stringFuzzy',
//					'searchCase' => 'String',
//					'searchName' => '审计员名'
//				),
				'logId' => array(
					'type' => 'stringMatch',
					'searchCase' => 'Int',
					'searchName' => '操作日志ID'
				),
				'audiDateTime' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"dateStart",
						"dateEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"dateStart" => '操作起始时间',
						"dateEnd" => '操作结束时间'
					)
				),
				'type' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '用户',
						'2' => '文件',
						'3' => '系统配置文件',
						'4' => '网站域名',
					),
					'searchCase' => 'Select',
					'searchName' => '操作类型'
				),
				'action' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '添加/上传',
						'2' => '修改'
					),
					'searchCase' => 'Select',
					'searchName' => '操作动作'
				),
				'result' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'0' => '未操作',
						'1' => '成功',
						'2' => '失败'
					),
					'searchCase' => 'Select',
					'searchName' => '操作结果'
				),
				'createDateTime' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"createDateStart",
						"createDateEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"createDateStart" => '申请起始时间',
						"createDateEnd" => '申请结束时间'
					)
				),
				'isExport' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '是',
						'0' => '否'
					),
					'searchCase' => 'Select',
					'searchName' => '是否已导出'
				)
			),
			'listConfg' => array(
				'编号' => 'newLogId',
//				'审计员' => 'operatorName',
//				'操作时间' => 'audiDateTime',
				'管理员' => 'userName',
				'日志ID' => 'logId',
				'操作IP' => 'auditIp',
				'提交审核时间' => 'createDateTime',
				'操作类型' => 'type',
				'操作动作' => 'action',
				'操作结果' => 'result',
				'是否已导出' => 'isExport'
			),
			'redTr' => array(
				'field' => 'result',
				'value' => '2'
			),
			'filter' => array(
				array(
					'field' => 'userName',
					'value' => 'audit',
					'type' => ' not like '
				)
			),
		),
		// 日志导出记录
		'downLog' => array(
			'table' => 'downlog',
			'pageName' => '日志导出记录',
			'selectCase' => array(
				'ip' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '下载IP'
				),
				'dateTime' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"dateStart",
						"dateEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"dateStart" => '起始时间',
						"dateEnd" => '结束时间'
					)
				),
				'adminId' => array(
					'type' => 'stringMatch',
					'searchCase' => 'Int',
					'searchName' => '管理员ID'
				),
				'adminName' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '管理员名称'
				),
				'downType' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'0' => 'excel',
						'1' => 'txt'
					),
					'searchCase' => 'Select',
					'searchName' => '下载类型'
				),
				'logType' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'adminlogin' => '管理员登陆日志',
						'adminmodify' => '账号维护日志',
						'audit' => '审计操作日志',
						'downlog' => '日志导出记录',
						'uploadfile' => '文件上传日志'
					),
					'searchCase' => 'Select',
					'searchName' => '日志类型'
				),
				'isExport' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '是',
						'0' => '否'
					),
					'searchCase' => 'Select',
					'searchName' => '是否已导出'
				)
			),
			'listConfg' => array(
				'日志编号' => 'newLogId',
				'下载时间' => 'dateTime',
				'下载IP' => 'ip',
				'管理员名称' => 'adminName',
				'下载类型' => 'downType',
				'日志类型' => 'logType',
				'下载文件名称' => 'downloadFile',
				'是否已导出' => 'isExport'
			)
		),
		// 文件上传日志
		'uploadfile' => array(
			'table' => 'uploadfile',
			'pageName' => '文件上传日志',
			'selectCase' => array(
				'ip' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '上传IP'
				),
				'dateTime' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"dateStart",
						"dateEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"dateStart" => '起始时间',
						"dateEnd" => '结束时间'
					)
				),
				'uploadUser' => array(
					'type' => 'stringMatch',
					'searchCase' => 'Int',
					'searchName' => '上传者ID'
				),
				'uploadUserName' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '上传者名称'
				),
				'fileName' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '文件名'
				),
				'status' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'0' => '失败',
						'1' => '成功'
					),
					'searchCase' => 'Select',
					'searchName' => '上传状态'
				),
				'isExport' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '是',
						'0' => '否'
					),
					'searchCase' => 'Select',
					'searchName' => '是否已导出'
				)
			),
			'listConfg' => array(
				'日志编号' => 'newLogId',
				'上传时间' => 'dateTime',
				'上传IP' => 'ip',
				'上传者名称' => 'uploadUserName',
				'文件名' => 'fileName',
				'文件大小' => 'byte',
				'上传状态' => 'status',
				'是否已导出' => 'isExport'
			),
			'redTr' => array(
				'field' => 'status',
				'value' => '0'
			)
		),
		// 刻录日志
		'record' => array(
			'table' => 'record',
			'pageName' => '刻录日志',
			'showMore' => true,
			'logId' => 'id',
			'selectCase' => array(
				'user_nickname' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '姓名'
				),
				'group_nickname' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '部门'
				),
				'plugin_name' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '插件名称'
				),
				'level' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'0' => '绝密',
						'1' => '机密',
						'2' => '秘密',
						'3' => '内部',
						'4' => '普通'
					),
					'searchCase' => 'Select',
					'searchName' => '密级'
				),
				'record_time' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"recordTimeStart",
						"recordTimeEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"recordTimeStart" => '刻录起始时间',
						"recordTimeEnd" => '刻录结束时间'
					)
				)
			),
			'listConfg' => array(
				'日志编号' => 'newLogId',
				'姓名' => 'user_nickname',
				'部门' => 'group_nickname',
				'插件名称' => 'plugin_name',
				'任务名称' => 'title',
				'密级' => 'level',
				'去向' => 'towhere',
				'用途' => 'touse',
				'光盘类型' => 'cdtype',
				'刻录时间' => 'record_time',
				'刻录状态' => 'record_status',
				'光盘编号' => 'record_label',
				'是否已导出' => 'isExport'
			),
			'moreConfg' => array(
				'日志ID' => 'id',
				'姓名' => 'user_nickname',
				'部门' => 'group_nickname',
				'插件名称' => 'plugin_name',
				'任务名称' => 'title',
				'密级' => 'level',
				'去向' => 'towhere',
				'用途' => 'touse',
				'光盘类型' => 'cdtype',
				'理由' => 'description',
				'文件表' => array('type' => 'fileList', 'value' => 'files'),
				'申请时间' => 'request_time',
				'刻录时间' => 'record_time',
				'刻录状态' => 'record_status',
				'光盘编号' => 'record_label',
				'是否已导出' => 'isExport',
				'照片' => array('type' => 'photo', 'value' => 'photo')
			)
		),
		// 申请流程日志
		'request' => array(
			'table' => 'request',
			'pageName' => '申请流程日志',
			'showMore' => true,
			'logId' => 'id',
			'selectCase' => array(
				'user_nickname' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '姓名'
				),
				'group_nickname' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '部门'
				),
				'level' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'0' => '绝密',
						'1' => '机密',
						'2' => '秘密',
						'3' => '内部',
						'4' => '普通'
					),
					'searchCase' => 'Select',
					'searchName' => '密级'
				),
				'type' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'0' => '刻录',
						'1' => '文件交换',
					),
					'searchCase' => 'Select',
					'searchName' => '类型'
				),
				'request_time' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"requestTimeStart",
						"requestTimeEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"requestTimeStart" => '申请起始时间',
						"requestTimeEnd" => '申请结束时间'
					)
				),
				'isExport' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '是',
						'0' => '否'
					),
					'searchCase' => 'Select',
					'searchName' => '是否已导出'
				)
			),
			'listConfg' => array(
				'日志编号' => 'newLogId',
				'姓名' => 'user_nickname',
				'部门' => 'group_nickname',
				'任务名称' => 'title',
				'密级' => 'level',
				'类型' => 'type',
				'去向' => 'towhere',
				'用途' => 'touse',
				'光盘类型' => 'cdtype',
				'申请时间' => 'request_time',
				'是否已导出' => 'isExport'
			),
			'moreConfg' => array(
				'日志ID' => 'id',
				'姓名' => 'user_nickname',
				'部门' => 'group_nickname',
				'任务名称' => 'title',
				'密级' => 'level',
				'类型' => 'type',
				'去向' => 'towhere',
				'用途' => 'touse',
				'光盘类型' => 'cdtype',
				'理由' => 'description',
				'文件表' => array('type' => 'fileList', 'value' => 'files'),
				'申请时间' => 'request_time',
				'审核状态' => 'response',
				'是否已导出' => 'isExport'
			)
		),
		// 文件交换日志
		'filerecv' => array(
			'table' => 'filerecv',
			'pageName' => '文件交换日志',
			'showMore' => true,
			'logId' => 'id',
			'selectCase' => array(
				'request_id' => array(
					'type' => 'stringMatch',
					'searchCase' => 'String',
					'searchName' => '申请流程ID'
				),
				'plugin_name' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '插件名称'
				),
				'send_nickname' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '发送姓名'
				),
				'send_groupname' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '发送部门'
				),
				'title' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '任务名称'
				),
				'level' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'0' => '绝密',
						'1' => '机密',
						'2' => '秘密',
						'3' => '内部',
						'4' => '普通'
					),
					'searchCase' => 'Select',
					'searchName' => '密级'
				),
				'files' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '文件表'
				),
				'request_time' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"requestTimeStart",
						"requestTimeEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"requestTimeStart" => '发送起始时间',
						"requestTimeEnd" => '发送结束时间'
					)
				),
				'recv_nickname' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '接收人姓名'
				),
				'recv_groupname' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '接收人部门'
				),
				'recv_time' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"recvTimeStart",
						"recvTimeEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"recvTimeStart" => '接收起始时间',
						"recvTimeEnd" => '接收结束时间'
					)
				),
				'isExport' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '是',
						'0' => '否'
					),
					'searchCase' => 'Select',
					'searchName' => '是否已导出'
				)
			),
			'listConfg' => array(
				'日志编号' => 'newLogId',
				'申请流程ID' => 'request_id',
				'插件名称' => 'plugin_name',
				'发送姓名' => 'send_nickname',
				'发送部门' => 'send_groupname',
				'任务名称' => 'title',
				'密级' => 'level',
				'发送时间' => 'request_time',
				'接收人姓名' => 'recv_nickname',
				'接收人部门' => 'recv_groupname',
				'接收时间' => 'recv_time',
				'是否已导出' => 'isExport'
			),
			'moreConfg' => array(
				'日志ID' => 'id',
				'申请流程ID' => 'request_id',
				'插件名称' => 'plugin_name',
				'发送姓名' => 'send_nickname',
				'发送部门' => 'send_groupname',
				'任务名称' => 'title',
				'密级' => 'level',
				'理由' => 'description',
				'文件表' => 'files',
				'发送时间' => 'request_time',
				'接收人姓名' => 'recv_nickname',
				'接收人部门' => 'recv_groupname',
				'接收时间' => 'recv_time',
				'是否已导出' => 'isExport'
			)
		),
		// audit管理员登陆日志
		'adminLoginAudit' => array(
			'table' => 'adminlogin',
			'pageName' => 'audit管理员登陆日志',
			'selectCase' => array(
				'loginIp' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '登陆IP'
				),
				'loginTime' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"dateStart",
						"dateEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"dateStart" => '起始时间',
						"dateEnd" => '结束时间'
					)
				),
				'loginStatus' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '成功',
						'0' => '失败'
					),
					'searchCase' => 'Select',
					'searchName' => '登录状态'
				),
				'isExport' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '是',
						'0' => '否'
					),
					'searchCase' => 'Select',
					'searchName' => '是否已导出'
				)
			),
			'listConfg' => array(
				'日志编号' => 'newLogId',
				'登录时间' => 'loginTime',
				'登陆IP' => 'loginIp',
				'用户名' => 'userName',
				'登录状态' => 'loginStatus',
				'是否已导出' => 'isExport'
			),
			'redTr' => array(
				'field' => 'loginStatus',
				'value' => '0'
			),
			'filter' => array(
				array(
					'field' => 'isAudit',
					'value' => '1',
					'type' => ' = '
				)
			),
		),
		// audit审计操作日志
		'auditAudit' => array(
			'table' => 'operation',
			'pageName' => '管理员操作日志',
			'selectCase' => array(
				'ip' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '操作IP'
				),
				'date' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"dateStart",
						"dateEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"dateStart" => '起始时间',
						"dateEnd" => '结束时间'
					)
				),
				'userId' => array(
					'type' => 'stringMatch',
					'searchCase' => 'Int',
					'searchName' => '用户ID'
				),
				'userName' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '用户名'
				),
				'isExport' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '是',
						'0' => '否'
					),
					'searchCase' => 'Select',
					'searchName' => '是否已导出'
				)
			),
			'listConfg' => array(
				'日志编号' => 'newLogId',
				'日期' => 'date',
				'IP地址' => 'ip',
				'用户名' => 'userName',
				'是否已导出' => 'isExport',
				'描述' => 'description'
			),
			'filter' => array(
				array(
					'field' => 'isAudit',
					'value' => '0',
					'type' => ' = '
				)
			),
		),
		// 用户登陆日志
		'userLogin' => array(
			'table' => 'userlogin',
			'pageName' => '用户登陆日志',
			'selectCase' => array(
				'loginIp' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '登陆IP'
				),
				'loginTime' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"dateStart",
						"dateEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"dateStart" => '起始时间',
						"dateEnd" => '结束时间'
					)
				),
				'userId' => array(
					'type' => 'stringMatch',
					'searchCase' => 'Int',
					'searchName' => '用户ID'
				),
				'userName' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '用户名'
				),
				'loginStatus' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '成功',
						'0' => '失败'
					),
					'searchCase' => 'Select',
					'searchName' => '登录状态'
				),
				'isExport' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '是',
						'0' => '否'
					),
					'searchCase' => 'Select',
					'searchName' => '是否已导出'
				)
			),
			'listConfg' => array(
				'日志编号' => 'newLogId',
				'登录时间' => 'loginTime',
				'登陆IP' => 'loginIp',
				'用户名' => 'userName',
				'登录状态' => 'loginStatus',
				'是否已导出' => 'isExport'
			),
			'redTr' => array(
				'field' => 'loginStatus',
				'value' => '0'
			)
		),
		// 管理员操作日志
		'operation' => array(
			'table' => 'operation',
			'pageName' => '管理员操作日志',
			'selectCase' => array(
				'ip' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '操作IP'
				),
				'date' => array(
					'type' => 'dateBetween',
					'parameter' => array(
						"dateStart",
						"dateEnd"
					),
					'searchCase' => 'DateBetween',
					'searchName' => array(
						"dateStart" => '起始时间',
						"dateEnd" => '结束时间'
					)
				),
				'userId' => array(
					'type' => 'stringMatch',
					'searchCase' => 'Int',
					'searchName' => '用户ID'
				),
				'userName' => array(
					'type' => 'stringFuzzy',
					'searchCase' => 'String',
					'searchName' => '用户名'
				),
				'isExport' => array(
					'type' => 'stringMatch',
					'dbMapping' => array(
						'all' => '全部',
						'1' => '是',
						'0' => '否'
					),
					'searchCase' => 'Select',
					'searchName' => '是否已导出'
				)
			),
			'listConfg' => array(
				'日志编号' => 'newLogId',
				'日期' => 'date',
				'IP地址' => 'ip',
				'用户名' => 'userName',
				'是否已导出' => 'isExport',
				'描述' => 'description'
			),
			'filter' => array(
				array(
					'field' => 'isAudit',
					'value' => '1',
					'type' => ' = '
				)
			),
		),
	);

	/**
	 * 字符串模糊查询
	 *
	 * @param string $field        	
	 * @param string $value        	
	 * @return string
	 */
	public static function stringFuzzy($field, $value) {
		$sql = "";
		if (!empty($value) || $value == "0") {
			$value = str_replace(' ', '%', $value);
			$sql .= " {$field} like '%{$value}%' ";
		}

		return $sql;
	}

	/**
	 * 时间间隔查询
	 * 需配置查询开始日期post KEY：from和查询结束日期post KEY：to
	 *
	 * @param string $field        	
	 * @param string $dateStart        	
	 * @param string $dateEnd        	
	 * @return string
	 */
	public static function dateBetween($field, $parameter) {
		$dateStart = reset($parameter);
		$dateEnd = next($parameter);
		$sql = array();

		if (!empty($dateStart)) {
			$dateStart = $dateStart . " 00:00:00";
			$sql [] = " {$field} >= '{$dateStart}' ";
		}

		if (!empty($dateEnd)) {
			$dateEnd = $dateEnd . " 00:00:00";
			$sql [] = " {$field} <= '{$dateEnd}' ";
		}

		return implode(' and ', $sql);
	}

	/**
	 * 字符串精确查询
	 *
	 * @param string $field        	
	 * @param string $value        	
	 * @return string
	 */
	public static function stringMatch($field, $value) {
		$sql = "";

		if (!empty($value) || $value == "0") {
			if ($value !== "all" && $value !== "") {
				$sql .= " {$field} = '{$value}' ";
			}
		}

		return $sql;
	}

	/**
	 * string类型搜索条件HTML
	 *
	 * @param sting $key        	
	 * @param string $searchName        	
	 * @param string $value        	
	 * @return string
	 */
	public static function searchCaseString($key, $searchName, $value) {
		return $searchName . '：<input name="' . $key . '" type="text" size="12" value="' . $value . '"/>';
	}

	/**
	 * select类型搜索条件HTML
	 *
	 * @param sting $key        	
	 * @param sting $searchName        	
	 * @param array $dbMapping        	
	 * @param sting $value        	
	 * @return string
	 */
	public static function searchCaseSelect($key, $searchName, $dbMapping, $value) {
		$html = $searchName . '：' . "\n";
		$html .= '<select name="' . $key . '">' . "\n";
		foreach ($dbMapping as $mappingKey => $mappingValue) {
			$html .= '<option ';
			if ($value == strval($mappingKey)) {
				$html .= "selected='selected'";
			}
			$html .= ' value="' . $mappingKey . '">' . $mappingValue . '</option>' . "\n";
		}
		$html .= '</select>';

		return $html;
	}

	/**
	 * 日期范围类型搜索条件HTML
	 *
	 * @param array $key        	
	 * @param array $searchName        	
	 * @param array $value        	
	 * @return string
	 */
	public static function searchCaseDateBetween($key, $searchName, $value) {
		$html = $searchName [$key [0]] . '：<input name="' . $key [0] . '" id="' . $key [0] . '" type="text" size="12" readonly="readonly"  value="' . $value [$key [0]] . '"/></li><li>' . "\n";
		$html .= $searchName [$key [1]] . '：<input name="' . $key [1] . '" id="' . $key [1] . '" type="text" size="12" readonly="readonly"  value="' . $value [$key [1]] . '"/>' . "\n";
		$html .= '<script>' . "\n";
		$html .= '	$(document).ready(function(){' . "\n";
		$html .= '	 $(function() {' . "\n";
		$html .= '	 	 $("#' . $key [0] . ',#' . $key [1] . '").datepicker({' . "\n";
		$html .= '	 	 	changeMonth: true,' . "\n";
		$html .= '        	changeYear: true,' . "\n";
		$html .= '        	dateFormat:\'yy-mm-dd\'' . "\n";
		$html .= '    	});' . "\n";
		$html .= '    	var dateFormat = $("#' . $key [0] . ',#' . $key [1] . '").datepicker(\'option\', \'dateFormat\');' . "\n";
		$html .= '    	$("#' . $key [0] . ',#' . $key [1] . '").datepicker(\'option\', \'dateFormat\', \'yy-mm-dd\');' . "\n";
		$html .= '	 });' . "\n";
		$html .= '	});' . "\n";
		$html .= '</script>' . "\n";
		return $html;
	}

	/**
	 * int类型搜索条件HTML
	 *
	 * @param sting $key        	
	 * @param string $searchName        	
	 * @param string $value        	
	 * @return string
	 */
	public static function searchCaseInt($key, $searchName, $value) {
		$html = $searchName . '：<input name="' . $key . '" id="' . $key . '" type="text" size="12" value="' . $value . '"/>' . "\n";
		$html .= '<script>' . "\n";
		$html .= '	$(document).ready(function(){' . "\n";
		$html .= '		$("#' . $key . '").blur(function(){' . "\n";
		$html .= '			if(isNaN($("#' . $key . '").val())){' . "\n";
		$html .= '				alert("' . $searchName . '只能为数字！");' . "\n";
		$html .= '				$("#' . $key . '").focus();' . "\n";
		$html .= '				$("#submitButton").unbind("click").click(function(){' . "\n";
		$html .= '					alert("' . $searchName . '只能为数字！");' . "\n";
		$html .= '				});' . "\n";
		$html .= '			}else{' . "\n";
		$html .= '				$("#submitButton").unbind("click").click(function(){' . "\n";
		$html .= '					$("#searchForm").submit();' . "\n";
		$html .= '				});' . "\n";
		$html .= '			}' . "\n";
		$html .= '		});' . "\n";
		$html .= '	});' . "\n";
		$html .= '</script>' . "\n";
		return $html;
	}

}
